﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/QuanLy.master" AutoEventWireup="true"
    CodeFile="Quan_Ly_Danh_Muc.aspx.cs" Inherits="Admin_Quan_Ly_Danh_Muc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label ID="thongbaotrantrung" runat="server" Text=""></asp:Label>
    <asp:Panel ID="panel" Visible="true" runat="server">
        <a name="bangnhomhh"></a>
        <asp:GridView ID="gvDuLieu" runat="server" AutoGenerateColumns="False" CellPadding="4"
            ForeColor="#333333" GridLines="None" AllowPaging="True" Width="100%" AllowSorting="True"
            OnPageIndexChanging="gvDuLieu_PageIndexChanging" OnRowCancelingEdit="gvDuLieu_RowCancelingEdit"
            OnRowDeleting="gvDuLieu_RowDeleting" OnRowEditing="gvDuLieu_RowEditing"
            OnRowUpdating="gvDuLieu_RowUpdating" OnSorting="gvDuLieu_Sorting">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField HeaderStyle-HorizontalAlign="left" DataField="manhomhh" HeaderText="MÃ NHÓM HÀNG HÓA"
                    ReadOnly="True" SortExpression="manhomhh">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField HeaderStyle-HorizontalAlign="left" DataField="tennhomhh" HeaderText="T&#202;N NH&#211;M H&#192;NG H&#211;A"
                    SortExpression="tennhomhh">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:CommandField ShowEditButton="True" CancelText="&lt;img border='0' src='images/nut/cancel.gif'&gt;"
                    DeleteText="X&#211;A" EditText="&lt;img border='0' src='images/nut/sua.jpg'&gt;"
                    InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="&lt;img border='0' src='images/nut/save.gif'&gt;" />
                <asp:CommandField ShowDeleteButton="True" CancelText="KH&#212;NG" DeleteText="&lt;img border='0' src='images/nut/xoa.jpg'&gt;"
                    EditText="SỬA" InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="LƯU" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
            <PagerSettings FirstPageText="ĐẦU TI&#202;N" LastPageText="CUỐI C&#217;NG" PageButtonCount="5" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <br />
        <hr color="#008000" size="1">
        <table width="50%">
            <tr>
                <td colspan="3">
                    <strong><span style="color: #ff0000">THÊM MỚI NHÓM HÀNG HÓA</span></strong>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                </td>
            </tr>
            <tr>
                <td colspan="3">
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">TÊN NHÓM HÀNG HÓA</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="tendanhmuc" runat="server" Width="95%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td colspan="2">
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td colspan="2">
                    <asp:Button ID="luudanhmuc" runat="server" Text="LƯU NHÓM HÀNG HÓA" Height="30px"
                        Width="70%" OnClick="luudanhmuc_Click" />
                </td>
            </tr>
        </table>
        <!--- Bảng Loại Hàng Hóa --->
        <hr />
        <a name="bangloaihh"></a>
        <asp:Label ID="thongbaoloaihh" runat="server" Text=""></asp:Label>
        <asp:GridView ID="bangloaihanghoa" runat="server" AutoGenerateColumns="False" CellPadding="4"
            ForeColor="#333333" GridLines="None" AllowPaging="True" Width="100%" AllowSorting="True"
            OnPageIndexChanging="bangloaihanghoa_PageIndexChanging" OnRowCancelingEdit="bangloaihanghoa_RowCancelingEdit"
            OnRowDeleting="bangloaihanghoa_RowDeleting" OnRowEditing="bangloaihanghoa_RowEditing"
            OnRowUpdating="bangloaihanghoa_RowUpdating" OnSorting="bangloaihanghoa_Sorting">
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <Columns>
                <asp:BoundField HeaderStyle-HorizontalAlign="left" DataField="maloaihh" HeaderText="MÃ LOẠI HÀNG HÓA"
                    ReadOnly="True" SortExpression="maloaihh" />
                <asp:TemplateField HeaderText="MÃ NHÓM HH" SortExpression="manhomhh">
                    <EditItemTemplate>
                        <asp:DropDownList ID="manhomhh2" DataSource='<%#tao_danh_sach_manhom_edit()%>' DataTextField="tennhomhh"
                            DataValueField="manhomhh" runat="server">
                        </asp:DropDownList>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <%#Eval("manhomhh") %>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:BoundField HeaderStyle-HorizontalAlign="left" DataField="tenloaihh" HeaderText="T&#202;N LOẠI H&#192;NG H&#211;A"
                    SortExpression="tenloaihh" />
                <asp:CommandField ShowEditButton="True" CancelText="&lt;img border='0' src='images/nut/cancel.gif'&gt;"
                    DeleteText="X&#211;A" EditText="&lt;img border='0' src='images/nut/sua.jpg'&gt;"
                    InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="&lt;img border='0' src='images/nut/save.gif'&gt;" />
                <asp:CommandField ShowDeleteButton="True" CancelText="KH&#212;NG" DeleteText="&lt;img border='0' src='images/nut/xoa.jpg'&gt;"
                    EditText="SỬA" InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="LƯU" />
            </Columns>
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#FFCC66" ForeColor="Blue" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
            <PagerSettings FirstPageText="ĐẦU TI&#202;N" LastPageText="CUỐI C&#217;NG" Mode="NumericFirstLast"
                PageButtonCount="5" />
        </asp:GridView>
        <br />
        <hr color="#008000" size="1">
        <table width="50%">
            <tr>
                <td colspan="3">
                    <strong><span style="color: #ff0000">THÊM MỚI LOẠI HÀNG HÓA</span></strong>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                </td>
            </tr>
            <tr>
                <td colspan="3">
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">TÊN LOẠI HÀNG HÓA</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="tenloaihh" runat="server" Width="95%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">NHÓM HÀNG HÓA</span>
                </td>
                <td colspan="2">
                    <asp:DropDownList ID="danhsachnhomhh" DataTextField="tennhomhh" DataValueField="manhomhh"
                        runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td colspan="2">
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td colspan="2">
                    <asp:Button ID="themloaihh" runat="server" Text="LƯU LOẠI HÀNG HÓA" Height="30px"
                        Width="70%" OnClick="themloaihh_Click" />
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
